<?php include _include(ADMIN_PATH.'view/htm/header.inc.htm');?>

<div class="row">
	<div class="col-lg-10 offset-lg-1">
		<div class="card">
			<div class="card-body">
				<form action="<?php echo url("plugin-setting-di_7we");?>" method="post" id="form">
					<h4 class="card-title">对接配置</h4>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">公众号原始ID</label>
						<div class="col-sm-10">
							<?php echo $input['startID']; ?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">通信key</label>
						<div class="col-sm-10">
							<?php echo $input['key']; ?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">公众号二维码地址</label>
						<div class="col-sm-10">
							<?php echo $input['QRcode']; ?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">引导关注文字</label>
						<div class="col-sm-10">
							<?php echo $input['lead']; ?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">是否开启</label>
						<div class="col-sm-10">
							<?php echo $input['reg_status']; ?>
						</div>
					</div>

<!-- 					<div class="form-group row">
	<label class="col-sm-2 form-control-label">登录开启</label>
	<div class="col-sm-10">
		<?php echo $input['login_status']; ?>
	</div>
</div> -->



					<div class="form-group row">
						<label class="col-sm-2 form-control-label"></label>
						<div class="col-sm-10">
							<button type="submit" class="btn btn-primary btn-block" id="submit" data-loading-text="<?php echo lang('submiting');?>..."><?php echo lang('confirm');?></button>
						</div>
					</div>
				</form>
				<p class="m-a-1 small">

				<strong>
					<a href="https://jq.qq.com/?_wv=1027&k=5pxMHML">交流群：558951704</a>
				<br>使用教程：<br>
				(1)<a href="http://wx.7we.net/" target="_blank">登录柒微订阅助手(没账号先注册)</a>
				<br>
				(2)<a href="http://7we.net/article-65.html" target="_blank">接入公众号到柒微订阅号助手</a>
				<br>(3)配置信息:1、xiuno后台插件配置;2、柒微订阅号助手后台-应用管理-第三方接入<br>
				说明：公众号二维码地址可以使用柒微后台的地址或自行上传到本地服务器（建议）；也可使用图床上传获取图片地址
			</div>
		</div>
	</div>
</div>

<?php include _include(ADMIN_PATH.'view/htm/footer.inc.htm');?>

<script>
let jform = $("#form");
let jsubmit = $("#submit");
let referer = '<?php echo http_referer();?>';
jform.on('submit', function(){
	jform.reset();
	jsubmit.button('loading');
	let postdata = jform.serialize();
	$.xpost(jform.attr('action'), postdata, function(code, message) {
		if(code == 0) {
			$.alert(message);
			jsubmit.text(message).delay(2000).button('reset').location(referer);
			return;
		} else {
			$.alert(message);
			jsubmit.button('reset');
		}
	});
	return false;
});
</script>
